#include "ktcarouselimagewgt.h"

#include <QPainter>

KtCarouselImageWgt::KtCarouselImageWgt(QWidget *parent)
	: QWidget(parent)
{}

KtCarouselImageWgt::~KtCarouselImageWgt()
{}

void KtCarouselImageWgt::setCarouselImage(const QPixmap& pixmap)
{
	m_pixmap = pixmap;
}

void KtCarouselImageWgt::paintEvent(QPaintEvent * event)
{
	if (m_pixmap.isNull()) return QWidget::paintEvent(event);
	QPainter painter(this);
	painter.drawPixmap(this->rect(), m_pixmap);
	return QWidget::paintEvent(event);
}
